<%--
  Created by IntelliJ IDEA.
  User: 23333
  Date: 2023/3/11
  Time: 19:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加员工</title>
</head>
<body>
<%
//  request.setCharacterEncoding("UTF-8");
//  response.setCharacterEncoding("UTF-8");
//  if(session.getAttribute("name") == null || session.getAttribute("roleId").equals(0)){
//    request.setAttribute("message","您没有访问权限，请重新登陆！");
//    request.getRequestDispatcher("index.jsp").forward(request,response);
//    return;
//  }
//    ResultSet resultSet = (ResultSet) session.getAttribute("resultSet");
%>
<h1>添加员工</h1>
<form action="/OA" method="post">
  <input type="hidden" name="action" value="add">
  <br>
  <label>姓名：
    <input type="text" name="name" placeholder="NAME" value="tom">
  </label>
  <br>
  <label>密码：
    <input type="password" name="password" placeholder="PASSWORD" value="123">
  </label>
  <br>
  <label>年龄：
    <input type="number" name="age" placeholder="AGE" value="18">
  </label>
  <br>
  <label>
    Gender:
    <input type="radio" name="gender" value="M" checked>Male
    <input type="radio" name="gender" value="F">Female
  </label>

  <br>
  <input type="submit" value="添加">
</form>
<p style="color: #FF0000">
  <%
    String message = (String) request.getAttribute("message");
    if (message != null){
      out.print(message);
    }
  %>
</p>
</body>
</html>
